class Solution:
    def translateStr(self, s: str) -> int:
        if(len(s) <= 1):
            return 1
        elif(int(s[0]+s[1]) < 26 and s[0] != '0'):
            return self.translateStr(s[1:])+self.translateStr(s[2:])
        else:
            return self.translateStr(s[1:])

    def translateNum(self, num: int) -> int:
        return self.translateStr(str(num))


if __name__ == "__main__":
    print(Solution().translateNum(12258))
    print(Solution().translateNum(26))
    print(Solution().translateNum(25))
    print(Solution().translateNum(506))
